import java.util.ArrayList;

import java.util.List;


public class HistEQ {
    public static void main(String[] args) {
        int sum = 0;
        List<Integer> counts = new ArrayList<>(args.length);
        List<Integer> sums=new ArrayList<>(args.length);
        for (String arg : args) {
            int count = Integer.parseInt(arg);
            sum += count;
            counts.add(count);
            sums.add(sum);
        }
        List<Double> probs = new ArrayList<>(counts.size());
        if (sum == 0) {
            System.err.println("!!");
            return;
        }
        final int sum_final=sum;
        sums.forEach(count->{
            probs.add(((double)count)/sum_final*(args.length-1));
        });
        System.out.println(counts);
        System.out.println(probs);

    }
}